<?php
include 'check.php';

mysql_query("
                    UPDATE pacientes SET
                        Nome = '" . $_POST["name"] . "',
                        Sobrenome = '" . $_POST["lastName"] . "',
                        RG = '" . $_POST["rg"] . "',
                        CPF = '" . $_POST["cpf"] . "',
                        Telefone1 = '" . $_POST["tel1"] . "',
                        Telefone2 = '" . $_POST["tel2"] . "',
                        Email = '" . $_POST["email"] . "',
                        Plano_de_Saude = '" . $_POST["insurance"] . "',
                        Alergias = '" . $_POST["sick1"] . "',
                        Deficiencias = '" . $_POST["sick2"] . "'
                        WHERE id = " . $_POST["id"] . ";
                    ") or die(mysql_error());
?>

<html>
    <head>
        <title>Main</title>
        <link rel="stylesheet" href="css/index.css">
    </head>

    <body>
    <center><div><button class="pure-button pure-button-disabled">Paciente Editado com Sucesso!</button></div>

        <br>

        <div><a class="pure-button pure-button-primary" href="mainLobby.php">Voltar para a Tela Inicial</a></div></center>
</body>
</html>